<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="huang">
    <title>Tips</title>
    <link rel="stylesheet" href="./tip.css">
    <style>
        body {
            margin: 0;
            /* background-color: darkcyan; */
        }
    </style>
</head>

<body>
    <div class="tips">
    </div>
    <button class="btn">点击</button>
    <script src="./tip.js"></script>
    <script>
        new Hint({ el: '.tips', msg: 'bala13241564154bala', second: 4000, bgc: 'red' })

        document.querySelector('.btn').addEventListener('click', () => {
            new Hint({ el: '.tips', msg: 'bala13241564154bala', bgc: 'green' })
        })
    </script>
</body>

</html>